package com.yunkeji.system.domain.bo;

import com.yunkeji.common.core.validate.AddGroup;
import com.yunkeji.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.util.Date;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yunkeji.common.core.domain.BaseEntity;

/**
 * 封禁IP和设备记录业务对象 ykj_sys_ip_device_banned
 *
 * @author yunkeji
 * @date 2024-09-26
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class SysIpDeviceBannedBo extends BaseEntity {

    /**
     * 自增主键
     */
    @NotNull(message = "自增主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     *
     */
    @NotNull(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 操作原因
     */
    @NotBlank(message = "操作原因不能为空", groups = { AddGroup.class, EditGroup.class })
    private String reason;

    /**
     * 封号结束时间
     */
    private Date endTime;

    /**
     * 0=分钟,1=一天,2=3天,3=一周,4=一个月,5=三个月,99=永久
     */
    @NotNull(message = "0=分钟,1=一天,2=3天,3=一周,4=一个月,5=三个月,99=永久不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer limitType;

    /**
     * 爱洞ID
     */
    private Long platformId;

    /**
     * 封禁类别，0=ip，1=设备
     */
    @NotNull(message = "封禁类别，0=ip，1=设备不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer bannedType;

    /**
     * 封禁目标内容
     */
    @NotBlank(message = "封禁目标内容不能为空", groups = { AddGroup.class, EditGroup.class })
    private String target;


}
